#include "UIModule.h"

UIModule::UIModule(UIModuleType type)
{
	m_type	 = type;
	m_pRouter		= UIEventRouter::getInstance();
	m_pConfigurator = UIConfigResourceManager::getInstance();
	m_pLogger		= UILogger::getInstance();
	m_pRouter->registerModule(m_type, this);
}


UIModule::~UIModule(void)
{
}

bool UIModule::sendEvent(UIEvent* event) {
	return m_pRouter->sendEvent(event);
}

bool UIModule::sendSyncEvent(UIEvent* event, UIEvent& retEvent, int timeOutSecond) {
	return m_pRouter->sendSyncEvent(event, retEvent, timeOutSecond);
}

bool UIModule::sendData(UIEvent* event) {
	return m_pRouter->sendData(event);
}